<template>
	<view class="page-box">
		<view class="page-title">
			<view class="title-text">{{pageData.PROJNAME}}</view>
			<view class="title-history" @click="goHistory">
				历史送报
			</view>
		</view>
		<view class="page-tag">{{pageData.PROJSTAGE}}</view>
		<view class="page-form">
			<view class="form-item" v-if="pageData.PROJBASEINFO">
				<view class="uni-title uni-common-pl">项目简介</view>
				<view class="uni-textarea">
					<view class="style-text">{{pageData.PROJBASEINFO}}</view>
					<view class="line-style"></view>
				</view>
			</view>
			<view class="form-item" v-if="pageData.REQUIREMENT">
				<view class="uni-title uni-common-pl">企业诉求</view>
				<view class="uni-textarea">
					<view class="style-text">
						{{pageData.REQUIREMENT}}
					</view>
					<view class="line-style"></view>
				</view>
			</view>
			<view class="form-item" v-if="pageData.PROGRESS">
				<view class="uni-title uni-common-pl">对接情况</view>
				<view class="uni-textarea">
					<view class="style-text">
						{{pageData.PROGRESS}}
					</view>
					<view class="line-style"></view>
				</view>
			</view>
			<view class="form-item" v-if="pageData.NEXTWORK">
				<view class="uni-title uni-common-pl">下一步推进及所需支持</view>
				<view class="uni-textarea">
					<view class="style-text">
						{{pageData.NEXTWORK}}
					</view>
					<view class="line-style"></view>
				</view>
			</view>
			<view class="form-item" v-if="pageData.OTHER">
				<view class="uni-title uni-common-pl">其他</view>
				<view class="uni-textarea">
					<view class="style-text">
						{{pageData.OTHER}}	
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataKey:'',
				projId:'',
				pageData:{},
				historyData:{},
			}
		},
		methods: {
			async getData(){
				uni.showLoading({
				
				})
				const res = await this.$req({
					url:'bus/reportmanage/view.do',
					data:{
						dataKey:this.dataKey,
						projId:this.projId
					}
				})
				uni.hideLoading()
				if(res.data.success){
					console.log(res,"res的职位")
					this.pageData=res.data.attributes.model
					this.historyData=res.data.attributes.history
				}else{
					uni.showToast({
						title:res.data.messages[0].content,
						icon:'none'
					})
				}
			},
			
			goHistory(){
				uni.navigateTo({
					url:`/pages/historyReport/historyReport?historyData=` + JSON.stringify(this.historyData),
				})
			},
		},
		onLoad(options){
			this.dataKey = options.dataKey;
			this.projId=options.projId;
			this.getData()
		
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #e9f0f2;
	}
	.page-box{
		margin: 20rpx 30rpx;
		padding: 38rpx 30rpx;
		width: 690rpx;
		background-color: #ffffff;
		border-radius: 20rpx;
		.page-title{
			display: flex;
			justify-content: space-between;
			align-items: center;
			.title-text{
				font-family: Alibaba-PuHuiTi-B;
				font-weight: 700;
				font-size: 30rpx;
				color: #414a5d;
			}
			.title-history{
				font-size: 28rpx;
				color: #0086B3;
			}
			.title-icon{
				display: flex;
				align-items: center;
				image{
					width: 27rpx;
					height: 27rpx;
					margin-right: 10rpx;
				}
				.icon-right{
					font-size: 24rpx;
					line-height: 34rpx;
					color: #0099cc;
				}
			}
		}
		.page-tag{
			width: 120rpx;
			height: 30rpx;
			margin-top: 14rpx;
			font-size: 24rpx;
			line-height: 30rpx;
			text-align: center;
			background-color: #00ac0c;
			border-radius: 4rpx;
			color: #FFFFFF;
		}
		.page-form{
			margin-top: 32rpx;
			// padding: 0 40rpx;
			.form-item{
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				margin-bottom: 30rpx;
				min-height: 108rpx;
				.uni-title{
					width: 130rpx;
					font-size: 26rpx;
					color: #414a5d;
				}
				.uni-textarea{
					width: 460rpx !important;
					font-size: 26rpx;
					line-height: 36rpx;
					// border-bottom: 2rpx solid #dce4e6;
					color: #808080;
					/deep/.uni-textarea-wrapper{
						width: 430rpx !important;
					}
					.line-style{
						width: 100%;
						height: 16rpx;
						border-bottom: 2rpx solid #dce4e6;
					}
				}
				.style-text{
					width: 460rpx !important;
					font-size: 26rpx;
					line-height: 34rpx;
				}
			}
		}
		
	}
</style>
